package com.futao.spring.lifecycle.cycle.init;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;

/**
 * @author ft
 * @date 2021/1/28
 */
@Slf4j
@Component
public class BeanInit implements InitializingBean {

    /**
     * 先执行
     */
    @PostConstruct
    public void init() {
        log.info(".");
    }

    /**
     * 后执行
     *
     * @throws Exception
     */
    @Override
    public void afterPropertiesSet() throws Exception {
        log.info(".");
    }
}
